import { url } from '@/config';
import request from '../axios'
export const checkToken = (params) => request({
  url: url + '/check-token',
  method: 'get',
  params: params
});

export const getUserInfo = () => request({
  url: url + '/user/info',
  method: 'get',
  params: {}
});

export const logout = () => request({
  url: url + '/logout',
  method: 'post',
  params: {}
})

export const login = (data) => request({
  url: url + '/login',
  method: 'post',
  data: data
})

export const register = (data) => request({
  url: url + '/register',
  method: 'post',
  data: data
})

export const updateUserInfo =(data) => request({
  url: url + '/user/update',
  method: 'post',
  data: data
})
export const updateUserPwd =(data) => request({
  url: url + '/user/updatePwd',
  method: 'post',
  data: data
})
